{"version":3,"file":"notification-manager.bundle.map.js","names":["this","BX","UI","exports","pull_client","main_core_events","main_core","ui_notification","ui_buttons","Uuid","static","replace","c","r","Math","random","v","toString","Notification","constructor","options","setUid","id","setCategory","category","setTitle","title","setText","text","setIcon","icon","setInputPlaceholderText","inputPlaceholderText","createButtons","button1Text","button2Text","SEPARATOR","getV4","uid","split","pop","join","Type","isStringFilled","Error","encodeIdToUid","getUid","getId","decodeUidToId","getCategory","getTitle","getText","getIcon","isString","getInputPlaceholderText","setButton1Text","Loc","getMessage","setButton2Text","getButton1Text","getButton2Text","PushNotification","PullHandler","getModuleId","handleNotify","params","extra","command","notification","notificationOptions","pushNotification","notifier","sendNotification","DesktopHelper","isBitrixDesktop","geApiVersion","navigator","userAgent","toLowerCase","includes","BXDesktopSystem","Number","GetProperty","desktop","apiReady","isMac","isLinux","BXIM","desktopStatus","Promise","resolve","turnedOnCallback","turnedOffCallback","desktopUtils","runningCheck","BrowserHelper","isChrome","isFirefox","isSafari","window","permission","isSafariBased","NotificationEvent","BaseEvent","CLICK","ACTION","CLOSE","eventType","getTypes","NotificationAction","BUTTON_1","BUTTON_2","USER_INPUT","action","NotificationCloseReason","CLOSED_BY_USER","EXPIRED","closeReason","BaseProvider","EventEmitter","super","eventNamespace","setEventNamespace","convertNotificationToNative","nativeNotification","canSendNotification","notify","notificationClick","eventOptions","data","emit","notificationAction","userInput","isSupported","console","warn","notificationClose","reason","NOTIFICATION_LIFETIME","DesktopProvider","getEventNamespace","registerEvents","isMainTab","notificationUid","NotificationShow","addEventListener","event","onNotificationClick","onNotificationAction","onNotificationClose","detail","MacProvider","NotificationCreate","NotificationAddText","NotificationAddImage","NotificationAddInput","NotificationAddAction","NotificationSetExpiration","addTextToNotification","trim","languageSafeRowLength","length","space","firstRow","words","shift","secondRow","WindowsProvider","BrowserProvider","body","tag","renotify","onclick","preventDefault","focus","isRunningOnAnyDevice","checkRunningOnThisDevice","then","isRunningOnThisDevice","BrowserNotificationAction","Action","balloon","setButtonClass","buttonType","getContainer","container","buttonOptions","isFunction","events","click","button","stopPropagation","Button","removeClass","addClass","BASE_BUTTON_CLASS","getButtonClass","TYPE_ACCEPT","getButtonTypes","buttonClass","isSupportedButtonType","_","t","_t","_t2","_t3","_t4","_t5","_t6","BrowserNotification","Balloon","userInputContainerNode","userInputNode","setActions","actions","isArray","forEach","push","onMouseEnter","handleMouseEnter","onMouseLeave","handleMouseLeave","Tag","render","animationClassName","contentWidth","isNumber","getWidth","handleContentClick","bind","getIconNode","getTitleNode","getTextNode","getUserInputContainerNode","getActionsNode","getCloseButtonNode","getData","Dom","create","attrs","className","outerHTML","children","style","height","width","src","getActions","map","isArrayFilled","onInputReplyClick","Text","encode","placeholderText","toggleUserInputContainerNode","handleUserInputEnter","handleUserInputClick","document","getElementById","replyToggleButton","showUserInput","setAutoHide","deactivateAutoHide","display","classList","add","disabled","activateAutoHide","remove","isCloseButtonVisible","handleCloseBtnClick","closedByUserHandler","clickHandler","close","userInputHandler","target","value","keyCode","KEY_CODE","ENTER","ESC","BrowserPageProvider","balloonOptions","type","position","autoHideDelay","showButton1","showButton2","action1Options","action2Options","Center","Notifier","provider","createProvider","PULL","subscribe","providerOptions","EVENT_NAMESPACE","isSupportedDesktopApp","isWindows","isSupportedBrowser","isNativeNotificationAllowed","eventName","handler","notifyViaDesktopProvider","NotificationManager","Event"],"sources":["notification-manager.bundle.js"],"mappings":"AAAAA,KAAKC,GAAKD,KAAKC,IAAM,CAAC,EACtBD,KAAKC,GAAGC,GAAKF,KAAKC,GAAGC,IAAM,CAAC,GAC3B,SAAUC,EAAQC,EAAYC,EAAiBC,EAAUC,EAAgBC,GACzE,aAEA,MAAMC,EACJC,eACE,MAAO,uCAAuCC,QAAQ,SAAS,SAAUC,GACvE,IAAIC,EAAIC,KAAKC,SAAW,GAAK,EAC3BC,EAAIJ,GAAK,IAAMC,EAAIA,EAAI,EAAM,EAC/B,OAAOG,EAAEC,SAAS,GACpB,GACF,EAMF,MAAMC,EACJC,YAA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